{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Action1使用Python模拟下面的PageRank计算过程，求每个节点的影响力（迭代100次）见PPT\n",
    "\n",
    "1、转移矩阵是否正确     2、影响力最终结构是否正确     3、是否完成了简化模型，随机浏览模型"
   ]
  },
  {
   "attachments": {
    "8c3a5265-c90e-4f46-ac6e-2791b83e9d22.png": {
     "image/png": "iVBORw0KGgoAAAANSUhEUgAAAN0AAADxCAYAAABPqrJXAAAgAElEQVR4Ae2dCfgVVfnHf5gKhFq47+UGhFqiKKL1D1OWtKTUVBRJUQpUXBJTSCtRXIlUzIXCSAXFTFMpF1BRwSWpTBN3XCCFXAo03D3/53P0nd/cuTNzZzln7p17z/s895k72znvec/7nbO9533blKOGkMD//vc/9ac//Un99Kc/Vd/97nfVl7/8ZbXeeuup1VZbTbW1tekj51zn/s9+9jP9PO85KpcE2srFbvNx+7vf/U5961vf0sD6xje+oX7yk5+o66+/Xv39739X//73v9V7772nC82Rc65zn+d4HkDyPuk4KocEHOjqUE///e9/dUtFy/Xtb39bTZ8+Xb399tuZOOE93icd0qMFJH1HjSsBB7qC6+YXv/iF+vznP69+8IMfqH/+859Gcye9H/7whzp98nHUmBJwoCuoXv72t7+pr33ta7pFootok0iflo/8yNdRY0nAga6A+vjNb36jx16/+tWvCsitPQvyY8xH/o4aRwIOdJbrgtnIL33pS+ovf/mL5ZzCkydf8ocPR40hAQc6i/UwZswY3cVj1rGeRP50NeHHUf0l4EBnqQ5oWVD0rLOSptmCD/hxLZ5pyaZPz4EuvcxqvsEYii5dvVu4IKPwA19ujBeUTLHnDnSG5c1sIZMX9RrD1SoOfMGfm9WsJSl79x3oDMuWLlzRs5RpiwB/8OmoPhJwoDModxakWR8rA8GnW0CvT0050BmSO6ZXWJrYXvg2xK7mE36dyZgpiSZPx4Euuaxin8TmEROsMhGmaPDtqFgJONAZkjfGxqZtKQ2xFpkM/MK3o2Il4EBnQN5sqynLWC5YXPh224KCUrF77kBnQL7sZ2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XlVCKS7AP+VwVIwEHOhSyplJBgEecelY5zK5myAOWCtXrtQL8OPHj0/Jdfzj8B+1Xhf/prubRQIOdBmkxvS6eLJinLd48eIMqYS/Egc63gBwdHUBoCmim4lfUkfFSMCBLqOc2RqDvw9aPZNUC3SM6UyDDv5Nl8OkTJotLbMa02zSqVGepUuX6hbCpKexeoDOtXQ1KtrwbQe6nAItckwHqza6l25Ml1MJUr7uQJdSYMHHi5y9lIkUk8sGlMfNXgZr1e65A11O+Ra1TgebtbqeWYvi1umySi7bew502eTmvYV3LdMWKUUtjksh4D9uX508545mJOBAl1OOpm0vac1kHTB45J4NwnaUcjgqRgIOdDnlXPZdBtiWAu6scQJziq8lX3egM1DtzbCfzoAYXBIJJeBAl1BQcY81087xuHK6e2Yk4EBnRo7adrFsPkTifKQYEotLJkQCDnQhQslyidk/vGuViTAnc7OWxdeYA50hmTez30tDInLJfCoBBzqDqtDsHp4Niqqlk3KgM1z9rRDLwLDIWi45BzrDVd5KUXsMi65lknOgs1DVrRafzoIImzpJBzpL1dtqkVgtibEpk3Wgs1itY8aMiYw5bjHbqqTZL8dYE34c1V8CDnSW64AWj9h39YrMSr7kbyvWuGXxNWXyDnQFVCtjPIyKi47QSn7kazrGeAEia+osHOgKql5mNeni4S3apJ/MMPZJn3zIz0Rs8bA83LXsEnCgyy67TG+ygE7EV0ywTNtqkh6maKRPPo4aUwIOdHWoF0zGsHnEqREt0vTp0zNH/WE/HO+TDumRLuk7alwJONDVuW7YFsR+PMZe7ODGdQI+S+giMuso7v04cs517vMcz/Me7/sDO9a5SC77GhJwoKshoKJus3Mblwm0VDg7wssYLReelwEWR865zn1mI3ne7fguqobM5fP/+3eyeDNJrA4AAAAASUVORK5CYII="
    }
   },
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "![image.png](attachment:8c3a5265-c90e-4f46-ac6e-2791b83e9d22.png)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "a = np.array([  [0,   0, 0, 1/3, 0 , 0], \n",
    "                [1/4, 0, 0, 0,   1/2,0],\n",
    "                [0,   1, 0, 1/3, 1/2,0],\n",
    "                [1/4, 0, 0, 0,   0,  1],\n",
    "                [1/4, 0, 1, 1/3, 0,  0],\n",
    "                [1/4, 0, 0, 0,   0,  0]])\n",
    "\n",
    "\n",
    "b = np.array([1/4, 1/4, 1/4, 1/4, 1/4, 1/4])\n",
    "w = b\n",
    "\n",
    "def work(a, w):\n",
    "    for i in range(100):\n",
    "        w = np.dot(a, w)\n",
    "        print(w)\n",
    "\n",
    "def random_work(a, w, n):\n",
    "    d = 0.85\n",
    "    for i in range(100):\n",
    "        w = (1-d)/n + d*np.dot(a, w)\n",
    "        print(w)\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[0.08333333 0.1875     0.45833333 0.3125     0.39583333 0.0625    ]\n",
      "[0.10416667 0.21875    0.48958333 0.08333333 0.58333333 0.02083333]\n",
      "[0.02777778 0.31770833 0.53819444 0.046875   0.54340278 0.02604167]\n",
      "[0.015625   0.27864583 0.60503472 0.03298611 0.56076389 0.00694444]\n",
      "[0.01099537 0.28428819 0.57002315 0.01085069 0.61993634 0.00390625]\n",
      "[0.0036169  0.31271701 0.59787326 0.00665509 0.57638889 0.00274884]\n",
      "[0.00221836 0.28909867 0.60312982 0.00365307 0.60099585 0.00090422]\n",
      "[1.21768904e-03 3.01052517e-01 5.90814284e-01 1.45881559e-03\n",
      " 6.04902103e-01 5.54591049e-04]\n",
      "[4.86271862e-04 3.02755474e-01 6.03989841e-01 8.59013310e-04\n",
      " 5.91604978e-01 3.04422261e-04]\n",
      "[2.86337770e-04 2.95924057e-01 5.98844301e-01 4.25990226e-04\n",
      " 6.04397746e-01 1.21567966e-04]\n",
      "[1.41996742e-04 3.02270458e-01 5.98264927e-01 1.93152408e-04\n",
      " 5.99057882e-01 7.15844425e-05]\n",
      "[6.43841360e-05 2.99564440e-01 6.01863783e-01 1.07083628e-04\n",
      " 5.98364810e-01 3.54991855e-05]\n",
      "[3.56945427e-05 2.99198501e-01 5.98782540e-01 5.15952195e-05\n",
      " 6.01915573e-01 1.60960340e-05]\n",
      "[1.71984065e-05 3.00966710e-01 6.00173486e-01 2.50196697e-05\n",
      " 5.98808662e-01 8.92363567e-06]\n",
      "[8.33988989e-06 2.99408631e-01 6.00379381e-01 1.32232373e-05\n",
      " 6.00186126e-01 4.29960163e-06]\n",
      "[4.40774577e-06 3.00095148e-01 5.99506101e-01 6.38457410e-06\n",
      " 6.00385874e-01 2.08497247e-06]\n",
      "[2.12819137e-06 3.00194039e-01 6.00290213e-01 3.18690891e-06\n",
      " 5.99509331e-01 1.10193644e-06]\n",
      "[1.06230297e-06 2.99755198e-01 5.99949767e-01 1.63398428e-06\n",
      " 6.00291807e-01 5.32047842e-07]\n",
      "[5.44661428e-07 3.00146169e-01 5.99901646e-01 7.97623585e-07\n",
      " 5.99950577e-01 2.65575743e-07]\n",
      "[2.65874528e-07 2.99975425e-01 6.00121724e-01 4.01741100e-07\n",
      " 5.99902048e-01 1.36165357e-07]\n",
      "[1.33913700e-07 2.99951090e-01 5.99926583e-01 2.02633989e-07\n",
      " 6.00121924e-01 6.64686320e-08]\n",
      "[6.75446630e-08 3.00060995e-01 6.00012120e-01 9.99470570e-08\n",
      " 5.99926684e-01 3.34784250e-08]\n",
      "[3.33156857e-08 2.99963359e-01 6.00024371e-01 5.03645907e-08\n",
      " 6.00012170e-01 1.68861657e-08]\n",
      "[1.67881969e-08 3.00006093e-01 5.99969461e-01 2.52150872e-08\n",
      " 6.00024396e-01 8.32892142e-09]\n",
      "[8.40502906e-09 3.00012202e-01 6.00018300e-01 1.25259706e-08\n",
      " 5.99969473e-01 4.19704923e-09]\n",
      "[4.17532355e-09 2.99984739e-01 5.99996943e-01 6.29830649e-09\n",
      " 6.00018306e-01 2.10125726e-09]\n",
      "[2.09943550e-09 3.00009154e-01 5.99993894e-01 3.14508815e-09\n",
      " 5.99996946e-01 1.04383089e-09]\n",
      "[1.04836272e-09 2.99998473e-01 6.00007628e-01 1.56868976e-09\n",
      " 5.99993895e-01 5.24858874e-10]\n",
      "[5.22896587e-10 2.99996948e-01 5.99995422e-01 7.86949554e-10\n",
      " 6.00007629e-01 2.62090679e-10]\n",
      "[2.62316518e-10 3.00003815e-01 6.00000763e-01 3.92814826e-10\n",
      " 5.99995422e-01 1.30724147e-10]\n",
      "[1.30938275e-10 2.99997711e-01 6.00001526e-01 1.96303276e-10\n",
      " 6.00000763e-01 6.55791295e-11]\n",
      "[6.54344254e-11 3.00000381e-01 5.99998093e-01 9.83136983e-11\n",
      " 6.00001526e-01 3.27345688e-11]\n",
      "[3.27712328e-11 3.00000763e-01 6.00001144e-01 4.90931752e-11\n",
      " 5.99998093e-01 1.63586064e-11]\n",
      "[1.63643917e-11 2.99999046e-01 5.99999809e-01 2.45514145e-11\n",
      " 6.00001144e-01 8.19280819e-12]\n",
      "[8.18380485e-12 3.00000572e-01 5.99999619e-01 1.22839061e-11\n",
      " 5.99999809e-01 4.09109793e-12]\n",
      "[4.09463537e-12 2.99999905e-01 6.00000477e-01 6.13704915e-12\n",
      " 5.99999619e-01 2.04595121e-12]\n",
      "[2.04568305e-12 2.99999809e-01 5.99999714e-01 3.06961006e-12\n",
      " 6.00000477e-01 1.02365884e-12]\n",
      "[1.02320335e-12 3.00000238e-01 6.00000048e-01 1.53507961e-12\n",
      " 5.99999714e-01 5.11420762e-13]\n",
      "[5.11693202e-13 2.99999857e-01 6.00000095e-01 7.67221600e-13\n",
      " 6.00000048e-01 2.55800838e-13]\n",
      "[2.55740533e-13 3.00000024e-01 5.99999881e-01 3.83724138e-13\n",
      " 6.00000095e-01 1.27923300e-13]\n",
      "[1.27908046e-13 3.00000048e-01 6.00000072e-01 1.91858434e-13\n",
      " 5.99999881e-01 6.39351333e-14]\n",
      "[6.39528113e-14 2.99999940e-01 5.99999988e-01 9.59121449e-14\n",
      " 6.00000072e-01 3.19770115e-14]\n",
      "[3.19707150e-14 3.00000036e-01 5.99999976e-01 4.79652144e-14\n",
      " 5.99999988e-01 1.59882028e-14]\n",
      "[1.59884048e-14 2.99999994e-01 6.00000030e-01 2.39808816e-14\n",
      " 5.99999976e-01 7.99267874e-15]\n",
      "[7.99362719e-15 2.99999988e-01 5.99999982e-01 1.19897799e-14\n",
      " 6.00000030e-01 3.99710120e-15]\n",
      "[3.99659331e-15 3.00000015e-01 6.00000003e-01 5.99550799e-15\n",
      " 5.99999982e-01 1.99840680e-15]\n",
      "[1.99850266e-15 2.99999991e-01 6.00000006e-01 2.99755512e-15\n",
      " 6.00000003e-01 9.99148328e-16]\n",
      "[9.99185042e-16 3.00000001e-01 5.99999993e-01 1.49877399e-15\n",
      " 6.00000006e-01 4.99625666e-16]\n",
      "[4.99591331e-16 3.00000003e-01 6.00000004e-01 7.49421926e-16\n",
      " 5.99999993e-01 2.49796260e-16]\n",
      "[2.49807309e-16 2.99999996e-01 5.99999999e-01 3.74694093e-16\n",
      " 6.00000004e-01 1.24897833e-16]\n",
      "[1.24898031e-16 3.00000002e-01 5.99999999e-01 1.87349660e-16\n",
      " 5.99999999e-01 6.24518272e-17]\n",
      "[6.24498867e-17 3.00000000e-01 6.00000002e-01 9.36763350e-17\n",
      " 5.99999999e-01 3.12245078e-17]\n",
      "[3.12254450e-17 2.99999999e-01 5.99999999e-01 4.68369794e-17\n",
      " 6.00000002e-01 1.56124717e-17]\n",
      "[1.56123265e-17 3.00000001e-01 6.00000000e-01 2.34188329e-17\n",
      " 5.99999999e-01 7.80636125e-18]\n",
      "[7.80627764e-18 2.99999999e-01 6.00000000e-01 1.17094429e-17\n",
      " 6.00000000e-01 3.90308162e-18]\n",
      "[3.90314762e-18 3.00000000e-01 6.00000000e-01 5.85465103e-18\n",
      " 6.00000000e-01 1.95156941e-18]\n",
      "[1.95155034e-18 3.00000000e-01 6.00000000e-01 2.92735632e-18\n",
      " 6.00000000e-01 9.75786906e-19]\n",
      "[9.75785439e-19 3.00000000e-01 6.00000000e-01 1.46367449e-18\n",
      " 6.00000000e-01 4.87887586e-19]\n",
      "[4.87891497e-19 3.00000000e-01 6.00000000e-01 7.31833945e-19\n",
      " 6.00000000e-01 2.43946360e-19]\n",
      "[2.43944648e-19 3.00000000e-01 6.00000000e-01 3.65919234e-19\n",
      " 6.00000000e-01 1.21972874e-19]\n",
      "[1.21973078e-19 3.00000000e-01 6.00000000e-01 1.82959036e-19\n",
      " 6.00000000e-01 6.09861621e-20]\n",
      "[6.09863455e-20 3.00000000e-01 6.00000000e-01 9.14794316e-20\n",
      " 6.00000000e-01 3.04932695e-20]\n",
      "[3.04931439e-20 3.00000000e-01 6.00000000e-01 4.57398559e-20\n",
      " 6.00000000e-01 1.52465864e-20]\n",
      "[1.52466186e-20 3.00000000e-01 6.00000000e-01 2.28698723e-20\n",
      " 6.00000000e-01 7.62328597e-21]\n",
      "[7.62329078e-21 3.00000000e-01 6.00000000e-01 1.14349406e-20\n",
      " 6.00000000e-01 3.81165466e-21]\n",
      "[3.81164687e-21 3.00000000e-01 6.00000000e-01 5.71747735e-21\n",
      " 6.00000000e-01 1.90582269e-21]\n",
      "[1.90582578e-21 3.00000000e-01 6.00000000e-01 2.85873441e-21\n",
      " 6.00000000e-01 9.52911719e-22]\n",
      "[9.52911471e-22 3.00000000e-01 6.00000000e-01 1.42936816e-21\n",
      " 6.00000000e-01 4.76456446e-22]\n",
      "[4.76456055e-22 3.00000000e-01 6.00000000e-01 7.14684314e-22\n",
      " 6.00000000e-01 2.38227868e-22]\n",
      "[2.38228105e-22 3.00000000e-01 6.00000000e-01 3.57341881e-22\n",
      " 6.00000000e-01 1.19114014e-22]\n",
      "[1.19113960e-22 3.00000000e-01 6.00000000e-01 1.78671040e-22\n",
      " 6.00000000e-01 5.95570261e-23]\n",
      "[5.95570133e-23 3.00000000e-01 6.00000000e-01 8.93355163e-23\n",
      " 6.00000000e-01 2.97784901e-23]\n",
      "[2.97785054e-23 3.00000000e-01 6.00000000e-01 4.46677434e-23\n",
      " 6.00000000e-01 1.48892533e-23]\n",
      "[1.48892478e-23 3.00000000e-01 6.00000000e-01 2.23338797e-23\n",
      " 6.00000000e-01 7.44462635e-24]\n",
      "[7.44462656e-24 3.00000000e-01 6.00000000e-01 1.11669383e-23\n",
      " 6.00000000e-01 3.72231195e-24]\n",
      "[3.72231277e-24 3.00000000e-01 6.00000000e-01 5.58346859e-24\n",
      " 6.00000000e-01 1.86115664e-24]\n",
      "[1.86115620e-24 3.00000000e-01 6.00000000e-01 2.79173483e-24\n",
      " 6.00000000e-01 9.30578192e-25]\n",
      "[9.30578277e-25 3.00000000e-01 6.00000000e-01 1.39586724e-24\n",
      " 6.00000000e-01 4.65289049e-25]\n",
      "[4.65289081e-25 3.00000000e-01 6.00000000e-01 6.97933619e-25\n",
      " 6.00000000e-01 2.32644569e-25]\n",
      "[2.32644540e-25 3.00000000e-01 6.00000000e-01 3.48966839e-25\n",
      " 6.00000000e-01 1.16322270e-25]\n",
      "[1.16322280e-25 3.00000000e-01 6.00000000e-01 1.74483405e-25\n",
      " 6.00000000e-01 5.81611349e-26]\n",
      "[5.81611350e-26 3.00000000e-01 6.00000000e-01 8.72417048e-26\n",
      " 6.00000000e-01 2.90805700e-26]\n",
      "[2.90805683e-26 3.00000000e-01 6.00000000e-01 4.36208537e-26\n",
      " 6.00000000e-01 1.45402838e-26]\n",
      "[1.45402846e-26 3.00000000e-01 6.00000000e-01 2.18104258e-26\n",
      " 6.00000000e-01 7.27014207e-27]\n",
      "[7.27014194e-27 3.00000000e-01 6.00000000e-01 1.09052132e-26\n",
      " 6.00000000e-01 3.63507114e-27]\n",
      "[3.63507107e-27 3.00000000e-01 6.00000000e-01 5.45260663e-27\n",
      " 6.00000000e-01 1.81753549e-27]\n",
      "[1.81753554e-27 3.00000000e-01 6.00000000e-01 2.72630325e-27\n",
      " 6.00000000e-01 9.08767768e-28]\n",
      "[9.08767751e-28 3.00000000e-01 6.00000000e-01 1.36315165e-27\n",
      " 6.00000000e-01 4.54383886e-28]\n",
      "[4.54383884e-28 3.00000000e-01 6.00000000e-01 6.81575823e-28\n",
      " 6.00000000e-01 2.27191938e-28]\n",
      "[2.27191941e-28 3.00000000e-01 6.00000000e-01 3.40787909e-28\n",
      " 6.00000000e-01 1.13595971e-28]\n",
      "[1.13595970e-28 3.00000000e-01 6.00000000e-01 1.70393956e-28\n",
      " 6.00000000e-01 5.67979853e-29]\n",
      "[5.67979855e-29 3.00000000e-01 6.00000000e-01 8.51969777e-29\n",
      " 6.00000000e-01 2.83989924e-29]\n",
      "[2.83989926e-29 3.00000000e-01 6.00000000e-01 4.25984888e-29\n",
      " 6.00000000e-01 1.41994964e-29]\n",
      "[1.41994963e-29 3.00000000e-01 6.00000000e-01 2.12992445e-29\n",
      " 6.00000000e-01 7.09974814e-30]\n",
      "[7.09974817e-30 3.00000000e-01 6.00000000e-01 1.06496222e-29\n",
      " 6.00000000e-01 3.54987406e-30]\n",
      "[3.54987407e-30 3.00000000e-01 6.00000000e-01 5.32481111e-30\n",
      " 6.00000000e-01 1.77493704e-30]\n",
      "[1.77493704e-30 3.00000000e-01 6.00000000e-01 2.66240556e-30\n",
      " 6.00000000e-01 8.87468517e-31]\n",
      "[8.87468520e-31 3.00000000e-01 6.00000000e-01 1.33120278e-30\n",
      " 6.00000000e-01 4.43734259e-31]\n",
      "[4.43734259e-31 3.00000000e-01 6.00000000e-01 6.65601389e-31\n",
      " 6.00000000e-01 2.21867130e-31]\n",
      "[2.21867130e-31 3.00000000e-01 6.00000000e-01 3.32800695e-31\n",
      " 6.00000000e-01 1.10933565e-31]\n"
     ]
    }
   ],
   "source": [
    " work(a, w)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "可见C和E的影响力最大，影响力最小的是F"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 不考虑随机访问，ABCDEF影响力分别为\n",
    "[2.21867130e-31 3.00000000e-01 6.00000000e-01 3.32800695e-31 6.00000000e-01 1.10933565e-31]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[0.10833333 0.196875   0.42708333 0.303125   0.37395833 0.090625  ]\n",
      "[0.12338542 0.21945312 0.44966146 0.13755208 0.50942708 0.06052083]\n",
      "[0.07647309 0.28022591 0.47951476 0.11516211 0.48490473 0.0637194 ]\n",
      "[0.07012926 0.25983504 0.5144058  0.10791202 0.49396734 0.05375053]\n",
      "[0.06807507 0.26233859 0.49887098 0.09809042 0.52022247 0.05240247]\n",
      "[0.06529229 0.2730605  0.50937464 0.09650805 0.50379857 0.05196595]\n",
      "[0.06484395 0.265489   0.51105977 0.09554567 0.511687   0.05137461]\n",
      "[0.06457127 0.26874631 0.5077039  0.09494776 0.51275142 0.05127934]\n",
      "[0.06440186 0.26914075 0.51075558 0.09480883 0.50967158 0.0512214 ]\n",
      "[0.0643625  0.26779582 0.50974256 0.09472358 0.51219014 0.0511854 ]\n",
      "[0.06433835 0.26885784 0.5096456  0.09468462 0.51129655 0.05117703]\n",
      "[0.06432731 0.26847293 0.51015751 0.09467238 0.51119797 0.0511719 ]\n",
      "[0.06432384 0.26842869 0.50978497 0.09466567 0.51162728 0.05116955]\n",
      "[0.06432194 0.26861041 0.50992792 0.09466294 0.51130798 0.05116882]\n",
      "[0.06432117 0.2684743  0.5099459  0.09466191 0.51142831 0.05116841]\n",
      "[0.06432087 0.26852528 0.50988106 0.0946614  0.51144314 0.05116825]\n",
      "[0.06432073 0.26853152 0.50993055 0.0946612  0.51138782 0.05116819]\n",
      "[0.06432067 0.26850798 0.50991229 0.09466111 0.5114298  0.05116815]\n",
      "[0.06432065 0.26852581 0.50991009 0.09466107 0.51141424 0.05116814]\n",
      "[0.06432064 0.26851919 0.50991862 0.09466106 0.51141235 0.05116814]\n",
      "[0.06432063 0.26851839 0.50991219 0.09466105 0.5114196  0.05116814]\n",
      "[0.06432063 0.26852146 0.50991459 0.09466105 0.51141413 0.05116813]\n",
      "[0.06432063 0.26851914 0.50991488 0.09466105 0.51141617 0.05116813]\n",
      "[0.06432063 0.26852    0.50991377 0.09466105 0.51141641 0.05116813]\n",
      "[0.06432063 0.26852011 0.50991461 0.09466105 0.51141547 0.05116813]\n",
      "[0.06432063 0.26851971 0.5099143  0.09466105 0.51141618 0.05116813]\n",
      "[0.06432063 0.26852001 0.50991426 0.09466105 0.51141592 0.05116813]\n",
      "[0.06432063 0.2685199  0.5099144  0.09466105 0.51141588 0.05116813]\n",
      "[0.06432063 0.26851988 0.5099143  0.09466105 0.51141601 0.05116813]\n",
      "[0.06432063 0.26851994 0.50991434 0.09466105 0.51141591 0.05116813]\n",
      "[0.06432063 0.2685199  0.50991434 0.09466105 0.51141595 0.05116813]\n",
      "[0.06432063 0.26851991 0.50991432 0.09466105 0.51141595 0.05116813]\n",
      "[0.06432063 0.26851991 0.50991434 0.09466105 0.51141594 0.05116813]\n",
      "[0.06432063 0.26851991 0.50991433 0.09466105 0.51141595 0.05116813]\n",
      "[0.06432063 0.26851991 0.50991433 0.09466105 0.51141595 0.05116813]\n",
      "[0.06432063 0.26851991 0.50991433 0.09466105 0.51141594 0.05116813]\n",
      "[0.06432063 0.26851991 0.50991433 0.09466105 0.51141595 0.05116813]\n",
      "[0.06432063 0.26851991 0.50991433 0.09466105 0.51141595 0.05116813]\n",
      "[0.06432063 0.26851991 0.50991433 0.09466105 0.51141595 0.05116813]\n",
      "[0.06432063 0.26851991 0.50991433 0.09466105 0.51141595 0.05116813]\n",
      "[0.06432063 0.26851991 0.50991433 0.09466105 0.51141595 0.05116813]\n",
      "[0.06432063 0.26851991 0.50991433 0.09466105 0.51141595 0.05116813]\n",
      "[0.06432063 0.26851991 0.50991433 0.09466105 0.51141595 0.05116813]\n",
      "[0.06432063 0.26851991 0.50991433 0.09466105 0.51141595 0.05116813]\n",
      "[0.06432063 0.26851991 0.50991433 0.09466105 0.51141595 0.05116813]\n",
      "[0.06432063 0.26851991 0.50991433 0.09466105 0.51141595 0.05116813]\n",
      "[0.06432063 0.26851991 0.50991433 0.09466105 0.51141595 0.05116813]\n",
      "[0.06432063 0.26851991 0.50991433 0.09466105 0.51141595 0.05116813]\n",
      "[0.06432063 0.26851991 0.50991433 0.09466105 0.51141595 0.05116813]\n",
      "[0.06432063 0.26851991 0.50991433 0.09466105 0.51141595 0.05116813]\n",
      "[0.06432063 0.26851991 0.50991433 0.09466105 0.51141595 0.05116813]\n",
      "[0.06432063 0.26851991 0.50991433 0.09466105 0.51141595 0.05116813]\n",
      "[0.06432063 0.26851991 0.50991433 0.09466105 0.51141595 0.05116813]\n",
      "[0.06432063 0.26851991 0.50991433 0.09466105 0.51141595 0.05116813]\n",
      "[0.06432063 0.26851991 0.50991433 0.09466105 0.51141595 0.05116813]\n",
      "[0.06432063 0.26851991 0.50991433 0.09466105 0.51141595 0.05116813]\n",
      "[0.06432063 0.26851991 0.50991433 0.09466105 0.51141595 0.05116813]\n",
      "[0.06432063 0.26851991 0.50991433 0.09466105 0.51141595 0.05116813]\n",
      "[0.06432063 0.26851991 0.50991433 0.09466105 0.51141595 0.05116813]\n",
      "[0.06432063 0.26851991 0.50991433 0.09466105 0.51141595 0.05116813]\n",
      "[0.06432063 0.26851991 0.50991433 0.09466105 0.51141595 0.05116813]\n",
      "[0.06432063 0.26851991 0.50991433 0.09466105 0.51141595 0.05116813]\n",
      "[0.06432063 0.26851991 0.50991433 0.09466105 0.51141595 0.05116813]\n",
      "[0.06432063 0.26851991 0.50991433 0.09466105 0.51141595 0.05116813]\n",
      "[0.06432063 0.26851991 0.50991433 0.09466105 0.51141595 0.05116813]\n",
      "[0.06432063 0.26851991 0.50991433 0.09466105 0.51141595 0.05116813]\n",
      "[0.06432063 0.26851991 0.50991433 0.09466105 0.51141595 0.05116813]\n",
      "[0.06432063 0.26851991 0.50991433 0.09466105 0.51141595 0.05116813]\n",
      "[0.06432063 0.26851991 0.50991433 0.09466105 0.51141595 0.05116813]\n",
      "[0.06432063 0.26851991 0.50991433 0.09466105 0.51141595 0.05116813]\n",
      "[0.06432063 0.26851991 0.50991433 0.09466105 0.51141595 0.05116813]\n",
      "[0.06432063 0.26851991 0.50991433 0.09466105 0.51141595 0.05116813]\n",
      "[0.06432063 0.26851991 0.50991433 0.09466105 0.51141595 0.05116813]\n",
      "[0.06432063 0.26851991 0.50991433 0.09466105 0.51141595 0.05116813]\n",
      "[0.06432063 0.26851991 0.50991433 0.09466105 0.51141595 0.05116813]\n",
      "[0.06432063 0.26851991 0.50991433 0.09466105 0.51141595 0.05116813]\n",
      "[0.06432063 0.26851991 0.50991433 0.09466105 0.51141595 0.05116813]\n",
      "[0.06432063 0.26851991 0.50991433 0.09466105 0.51141595 0.05116813]\n",
      "[0.06432063 0.26851991 0.50991433 0.09466105 0.51141595 0.05116813]\n",
      "[0.06432063 0.26851991 0.50991433 0.09466105 0.51141595 0.05116813]\n",
      "[0.06432063 0.26851991 0.50991433 0.09466105 0.51141595 0.05116813]\n",
      "[0.06432063 0.26851991 0.50991433 0.09466105 0.51141595 0.05116813]\n",
      "[0.06432063 0.26851991 0.50991433 0.09466105 0.51141595 0.05116813]\n",
      "[0.06432063 0.26851991 0.50991433 0.09466105 0.51141595 0.05116813]\n",
      "[0.06432063 0.26851991 0.50991433 0.09466105 0.51141595 0.05116813]\n",
      "[0.06432063 0.26851991 0.50991433 0.09466105 0.51141595 0.05116813]\n",
      "[0.06432063 0.26851991 0.50991433 0.09466105 0.51141595 0.05116813]\n",
      "[0.06432063 0.26851991 0.50991433 0.09466105 0.51141595 0.05116813]\n",
      "[0.06432063 0.26851991 0.50991433 0.09466105 0.51141595 0.05116813]\n",
      "[0.06432063 0.26851991 0.50991433 0.09466105 0.51141595 0.05116813]\n",
      "[0.06432063 0.26851991 0.50991433 0.09466105 0.51141595 0.05116813]\n",
      "[0.06432063 0.26851991 0.50991433 0.09466105 0.51141595 0.05116813]\n",
      "[0.06432063 0.26851991 0.50991433 0.09466105 0.51141595 0.05116813]\n",
      "[0.06432063 0.26851991 0.50991433 0.09466105 0.51141595 0.05116813]\n",
      "[0.06432063 0.26851991 0.50991433 0.09466105 0.51141595 0.05116813]\n",
      "[0.06432063 0.26851991 0.50991433 0.09466105 0.51141595 0.05116813]\n",
      "[0.06432063 0.26851991 0.50991433 0.09466105 0.51141595 0.05116813]\n",
      "[0.06432063 0.26851991 0.50991433 0.09466105 0.51141595 0.05116813]\n",
      "[0.06432063 0.26851991 0.50991433 0.09466105 0.51141595 0.05116813]\n",
      "[0.06432063 0.26851991 0.50991433 0.09466105 0.51141595 0.05116813]\n"
     ]
    }
   ],
   "source": [
    "random_work(a, w, 4)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "可见F的影响力最大，影响力最小的是A"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# ABCDEF影响力分别为\n",
    "[0.06432063 0.26851991 0.50991433 0.09466105 0.51141595 0.05116813]"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3.8.0 64-bit ('Bi_env': venv)",
   "language": "python",
   "name": "python38064bitbienvvenvba07af95a1bb4b078aa8134bba84dff2"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.0"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
